package Controller;
import java.util.ArrayList;



/**
 * A lane contains 4 2D points, the spawn point, the gate (traffic light) point, the turn point and the despawn point
 * @author imahilus
 */
public class SimulatorLane
{
    public int[] spawnPoint   = {0, 0};
    public int[] gatePoint    = {0, 0};
    public int[] turnPoint    = {0, 0};
    public int[] despawnPoint = {0, 0};
    public int[] trafficLight = {0, 0};
    public volatile ArrayList<SimulatorObject> contents;
    public char                                trafficLightGraphic;


    public SimulatorLane(int spawnPointX, int spawnPointY, int gatePointX, int gatePointY, int turnPointX, int turnPointY, int despawnPointX, int despawnPointY, int trafficLightX, int trafficLightY)
    {
        spawnPoint[0]       = spawnPointX;
        spawnPoint[1]       = spawnPointY;
        gatePoint[0]        = gatePointX;
        gatePoint[1]        = gatePointY;
        turnPoint[0]        = turnPointX;
        turnPoint[1]        = turnPointY;
        despawnPoint[0]     = despawnPointX;
        despawnPoint[1]     = despawnPointY;
        trafficLight[0]     = trafficLightX;
        trafficLight[1]     = trafficLightY;
        contents            = new ArrayList<SimulatorObject>();
        trafficLightGraphic = SimulatorWaypoints.crossingMap.charAt((trafficLightY*SimulatorWaypoints.lineWidth)+trafficLightX);
    }
}
